<template>
	<view class="content">
		<!-- 顶部导航栏组件 -->
		<QSNavbar :navbarItems="navbarItems_1" backgroundColor="#ffffff">
		</QSNavbar>
		<view v-for="(itemxx,indexxx) in Homelist" :key="indexxx">
			<!-- 轮播图 -->
			<div class="banner" v-if="itemxx.flag == 0&&homeData.banner_state == 1">
				<div class="uview-banner">
					<u-swiper :list="homeData.banner" keyName="banner_image" height="340rpx"></u-swiper>
				</div>
			</div>
			<!-- 金刚区 -->
			<div :class="[{ banner_disabled: homeData.banner_state == 0 }, 'peter']"
				v-if="itemxx.flag == 1&&homeData.vajra_state == 1">
				<u-scroll-list :indicator="homeData.cate.length > 10">
					<view class="peter-cates">
						<!-- 第一行 -->
						<view class="cates">
							<view @click="cate_list(item ,index)" class="cate-item"
								v-for="(item, index) in homeData.cate" :key="index" v-if="item.row_state == 0">
								<u--image :src="item.icon" width="80rpx" height="80rpx" :showMenuByLongpress="false">
								</u--image>
								<text>{{ item.name }}</text>
							</view>
						</view>
						<!-- 第二行 -->
						<view class="cates">
							<view @click="cate_list_item(item ,index)" class="cate-item"
								v-for="(item, index) in homeData.cate" :key="index" v-if="item.row_state == 1">
								<u--image :src="item.icon" width="80rpx" height="80rpx" :showMenuByLongpress="false">
								</u--image>
								<text>{{ item.name }}</text>
							</view>
						</view>
					</view>
				</u-scroll-list>
			</div>
			<!-- 通知公告 -->
			<view class="notice" v-if="itemxx.flag == 2&&homeData.dynamic_state == 1">
				<u-notice-bar :text="text1" bgColor="#fff" direction="column" color="#333333" @click="openNotice"
					icon="https://jiangsudiantuo2022.oss-cn-hangzhou.aliyuncs.com/img/89283211901b92921a2c2ffb6adb5e5f81fa5416.png">
				</u-notice-bar>
			</view>

			<!-- 胶囊区幻灯片 -->
			<div class="capsule" v-if="itemxx.flag == 3&&homeData.cachet_state == 1">
				<u-swiper :list="homeData.capsule" keyName="banner_image" imgMode="aspectFill" bgColor="#fff"
					height="200rpx">
				</u-swiper>
			</div>

			<!-- 企业介绍 -->
			<view v-if="itemxx.flag == 4&&homeData.introduce_state == 1">
				<view class="business">
					<view class="business-line"></view>
					<view class="business-title">
						<text> 企业介绍 </text>
					</view>
				</view>
				<view class="business-content">
					<view class="mini-business-content" v-for="(item, index) in business_arr" :key="index"
						@click="businessclick(item, index)">
						<u--image :showLoading="true" :src="item.image" width="210rpx" height="140rpx" mode="aspectFit"
							:showMenuByLongpress="false"></u--image>
						<view class="business-text">
							<text>{{ item.text }}</text>
						</view>
					</view>
				</view>
			</view>
			<!-- 营销中心 -->
			<view v-if="itemxx.flag == 5&&homeData.market_state == 1">
				<view class="business">
					<view class="business-line"></view>
					<view class="business-title">
						<text> 营销中心 </text>
					</view>
				</view>
				<view class="market">
					<view class="market-left" @click="Points">
						<u--image :src="marketLeftImage" width="100%" height="100%"></u--image>
						<view class="market-left-text">
							<text>积分商城</text>
						</view>
					</view>
					<view class="market-right">
						<view v-for="(baseListItem, baseListIndex) in baseList" :key="baseListIndex" class="item"
							@click="base_List(baseListItem,baseListIndex)">
							<u-icon :name="baseListItem.name" :size="17"></u-icon>
							<text class="grid-text">{{ baseListItem.title }}</text>
						</view>
					</view>
				</view>
			</view>

			<!-- 精选活动 -->
			<view v-if="itemxx.flag == 6&&homeData.activity_state == 1">
				<view class="business">
					<view class="business-line"></view>
					<view class="business-title">
						<text> 精选活动 </text>
					</view>
				</view>
				<view class="activity">
					<view class="activity-left">
						<u--image :showLoading="true" :src="activityLeftImage" width="95%" height="320rpx"
							radius="10rpx" :showMenuByLongpress="false"></u--image>
						<view class="activity-left-text">
							<view class="activity-left-title">
								<view>热门</view>
								<view>赛事</view>
							</view>
							<text>丰富赛事等你参加</text>
							<text>立即报名></text>
						</view>
					</view>
					<view class="activity-right">
						<u--image :showLoading="true" :src="activityRightImage[0]" width="95%" height="148rpx"
							radius="10rpx" :showMenuByLongpress="false"></u--image>
						<view class="activity-right-text">
							<view class="activity-right-title">
								<view>私教</view>
								<view>预约</view>
							</view>
							<text>资深私教辅导</text>
							<text>立即预约></text>
						</view>
						<u--image :showLoading="true" :src="activityRightImage[1]" width="95%" height="148rpx"
							radius="10rpx" :showMenuByLongpress="false"></u--image>
						<view class="activity-right-text-last">
							<view class="activity-right-title-last">
								<view>场地</view>
								<view>预定</view>
							</view>
							<text>在家也能订场约赛</text>
							<text class="field-btn">立即预定></text>
						</view>
					</view>
				</view>
			</view>

			<!-- 热门项目 -->
			<view v-if="itemxx.flag == 7&&homeData.project_state == 1">
				<view class="business">
					<view class="business-line"></view>
					<view class="business-title">
						<text> 热门项目 </text>
					</view>
				</view>
				<view class="project">
					<view class="cates">
						<view class="cate-item project-item" v-for="(item, index) in filterTab" :key="index "
							@click="openKind(item,index)">
							<u--image :src="item.icon" width="50rpx" height="50rpx" :showMenuByLongpress="false">
							</u--image>
							<text>{{ item.name }}</text>
						</view>
						<!-- <view
			        class="cate-item project-item"
			        v-for="(item, index) in projectList"
			        :key="index"
			      >
			        <u--image
			          :src="item.icon"
			          width="50rpx"
			          height="50rpx"
			          :showMenuByLongpress="false"
			        ></u--image>
			        <text>{{ item.name }}</text>
			      </view> -->
					</view>
				</view>
			</view>

			<!-- 人气教练 -->
			<view v-if="itemxx.flag == 8&&homeData.coach_state == 1">
				<view class="business">
					<view class="business-line"></view>
					<view class="business-title">
						<text> 人气教练 </text>
					</view>
				</view>
				<view class="" style="display: flex; justify-content: center; flex-direction: row; ">
					<view class="teacher">
						<view class="teacher-item" v-for="(item, index) in jisolianlist" :key="index"
							@click="openTeacher">
							<!-- @click="openTeacher" -->
							<view v-if="index < 2" class="teacher-something">
								<view class="teacher-item-left">
									<!-- marketLeftImage -->
									<!-- <u--image :src="marketLeftImage" width="100%" height="100%"></u--image> -->
									<u-avatar :src="item.img"></u-avatar>
								</view>
								<view class="teacher-item-right">
									<view class="teacher-info">
										<view class="teacher-name">{{item.name}}</view>
										<u-tag v-if="item.sex == 1" text="男" size="mini" type="warning"></u-tag>
										<u-tag v-if="item.sex == 0" text="女" size="mini" type="warning"></u-tag>
									</view>
									<u-rate :value="item.value" size="10" :touchable="false" :disabled="true"></u-rate>
									<view class="teacher-desc">{{item.title}}</view>
								</view>
							</view>
							<navigator url="/pages/index/coach/coach" v-if="index == 2" class="teacher-more">
								<u--image :src="more" width="31rpx" height="31rpx"
									:showMenuByLongpress="false"></u--image>
								<text>更多</text>
							</navigator>
						</view>
					</view>
				</view>
			</view>
			<!-- 推荐场馆 -->
			<!-- <view v-if="itemxx.flag == 9&&homeData.venue_state == 1">
				<view class="business">
					<view class="business-line"></view>
					<view class="business-title">
						<text> 旗下场馆 </text>
					</view>
					<navigator class="news-list-more" url="../../page_points/venuesList/venuesList">
						<text>更多</text>
						<u-icon name="arrow-right" :customStyle="{ color: 'rgb(190,190,190) !important' }" :bold="true">
						</u-icon>
					</navigator>
				</view>
				<goodsSwiper @handClick="openStoreDetail()" :datas="detail" :config="config"
					v-if="detail.list.length > 0">
				</goodsSwiper>
			</view> -->
			<view v-if="itemxx.flag == 9&&homeData.venue_state == 1">
				<view class="business">
					<view class="business-line"></view>
					<view class="business-title">
						<text> 旗下场馆 </text>
					</view>
					<navigator class="news-list-more" url="../../page_points/venuesList/venuesList">
						<text>更多</text>
						<u-icon name="arrow-right" :customStyle="{ color: 'rgb(190,190,190) !important' }" :bold="true">
						</u-icon>
					</navigator>
				</view>
				<!-- 三个子场馆以上 style 3-->
				<scroll-view class="footer-3" scroll-x style="margin-top: 20rpx;padding: 10rpx 10rpx 10rpx 0rpx;"
					v-if="homeData.style == 3">
					<view class="flex-align">
						<view v-for="(im,indexx) in detail.list" :key="indexx" style="margin-left: 20rpx;"
							@click="StoreDetaillist(im)">

							<view class="" style="width: 100%;height: 140rpx;">
								<image style="width:223.78rpx;height: 130rpx;border-radius: 10rpx;"
									:src="im.venue_thumb" mode=""></image>
							</view>
							<view
								style="text-overflow: ellipsis;overflow: hidden;white-space: nowrap;font-size: 24rpx;line-height: 33rpx;text-align: center;margin-top: 10rpx;color: #333333;">
								{{im.venue_name}}
							</view>
							<view
								style="text-overflow: ellipsis;overflow: hidden;white-space: nowrap;font-size: 24rpx;line-height: 33rpx;text-align: center;margin-top: 10rpx;color: #333333;">
								{{im.open_time}}
							</view>
						</view>
					</view>
				</scroll-view>
				<!-- 两个子场馆以上  style 2-->
				<view class="footer-3" style="margin-top: 20rpx;padding: 10rpx 10rpx 10rpx 0rpx;"
					v-if="homeData.style == 2">
					<view class="flex-align" style="flex-wrap: wrap;">
						<!-- .slice(0,2) -->
						<view v-for="(im,indexx) in detail.list" :key="indexx"
							style="margin-left: 30rpx;margin-bottom: 20rpx;" @click="StoreDetaillist(im)">

							<view class="" style="width: 100%;height: 140rpx;">
								<image style="width:332rpx;height: 212rpx;border-radius: 10rpx;" :src="im.venue_thumb"
									mode=""></image>
							</view>
							<view style="font-size: 26rpx;line-height: 33rpx;text-align: left;margin-top: 90rpx;color: #333333;font-weight: 600;white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;width:332rpx;">
								{{im.venue_name}}
							</view>
							<view style="font-size: 24rpx;line-height: 33rpx;text-align: left;margin-top: 10rpx;color: #333333;white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;width:332rpx;">
								{{im.open_time}}
							</view>
							<view class="tag-list flex-align">
								<u-tag v-for="(item2,index2) in im.marks" :key="index2" :text="item2" plain size="mini">
								</u-tag>
							</view>
						</view>
					</view>
				</view>
				<!-- 一个子场馆以上  style 1-->
				<view class="footer-3" style="margin-top: 20rpx;padding: 10rpx 10rpx 10rpx 0rpx;"
					v-if="homeData.style == 1">
					<view class="flex-align">
						<view v-for="(im,indexx) in detail.list.slice(0,1)" :key="indexx" style="margin-left: 30rpx;"
							@click="StoreDetaillist(im)">

							<view class="" style="width: 100%;height: 140rpx;">
								<image style="width:690rpx;height: 270rpx;border-radius: 10rpx;" :src="im.venue_thumb"
									mode=""></image>
							</view>
							<view
								style="text-overflow: ellipsis;overflow: hidden;white-space: nowrap;font-size: 24rpx;line-height: 33rpx;text-align: center;margin-top: 150rpx;color: #333333;">
								{{im.venue_name}}
							</view>
							<view
								style="text-overflow: ellipsis;overflow: hidden;white-space: nowrap;font-size: 24rpx;line-height: 33rpx;text-align: center;margin-top: 10rpx;color: #333333;">
								{{im.open_time}}
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- 行业资讯 -->
			<view v-if="itemxx.flag == 10&&homeData.info_state == 1" :style="'order:'+orders[10]">
				<view class="business">
					<view class="business-line"></view>
					<view class="business-title">
						<text> 行业动态 </text>
					</view>
					<view class="news-list-more" @click="goNewsList">
						<text>更多</text>
						<u-icon name="arrow-right" :customStyle="{ color: 'rgb(190,190,190) !important' }" :bold="true">
						</u-icon>
					</view>
				</view>
				<view class="" style="display: flex; justify-content: center; align-items: center; ">
					<view class="news-list">
						<view class="new-item" v-for="(item, index) in newsList" :key="index"
							@click="goNewsDetail(item.id)">
							<view class="new-item-left">
								<view class="new-item-title">
									<!-- <u-tag
					            text="头条"
					            plain
					            size="mini"
					            type="warning"
					            v-if="index == 0"
					          ></u-tag>
					          <u--text
					            :text="item.name"
					            lines="2"
					            color="rgb(51,51,51)"
					            size="30rpx"
					            :bold="true"
					          ></u--text> -->
									<view class="">
										<text
											style="width: 40rpx;height: 15rpx;background-color:  rgb(249,52,66); padding: 0rpx 14rpx ;color: rgb(255, 255, 255);font-size: 24rpx;"
											v-if="index == 0">头条</text>
										<text style="color: rgb(51,51,51);padding: 10rpx 4rpx 10rpx;font-size: 30rpx;text-decoration: none;
					font-weight: bold;
					word-wrap: normal;">{{item.name}}</text>

									</view>
								</view>
								<view>
									<u--text :text="item.remark" lines="2" color="rgb(190,190,190)"
										size="25rpx"></u--text>
								</view>
								<view class="new-item-time">
									<view class="building">
										<u--text :prefixIcon="building" :text="item.sender" align="left" size="20rpx"
											:iconStyle="{ width: 20 + 'rpx', height: 20 + 'rpx' }" color="#999999"
											lines="1">
										</u--text>
									</view>
									<text class="new-item-time-line">|</text>
									<u--text :text="item.create_at" size="20rpx" color="#999999" align="left"></u--text>
								</view>
							</view>
							<view class="new-item-right">
								<u--image :src="item.cover" width="220rpx" height="138rpx" :showMenuByLongpress="false">
								</u--image>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- 卡片区 -->
			<view style="margin-bottom: 30rpx;" v-if="itemxx.flag == 11 && homeData.show_buy == 1 && lastDataList !=''">
				<movable-swiper :dataList="lastDataList" :height="movHeight">
					<template v-slot="{movSlotData}">
						<!-- 这里面放你自己的要显示的东西，图片什么的，下面这是示例 -->
						<view v-if="movSlotData" style="color: #333333;">

							<text v-if="movSlotData.order_type == 3"
								style="position: absolute;top: 20rpx;left: 20rpx;width: 80%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;font-size: 32rpx;font-weight: 600;">{{movSlotData.court_name}}</text>
							<text v-else
								style="position: absolute;top: 20rpx;left: 20rpx;width: 80%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;font-size: 32rpx;font-weight: 600;">{{movSlotData.goods_name}}</text>
							<!-- <text style="position: absolute;bottom: 20rpx;left: 20rpx;"
								v-if="movSlotData.order_type == 1">{{movSlotData.goods.times + movSlotData.goods.gifts}}次
							</text>
							<text style="position: absolute;bottom: 20rpx;left: 20rpx;"
								v-if="movSlotData.order_type == 3"></text>
							<text style="position: absolute;bottom: 20rpx;left: 20rpx;"
								v-if="movSlotData.order_type == 8"></text> -->
							<text
								style="position: absolute;bottom: 20rpx;left: 20rpx;font-size: 28rpx;color: #999999;">{{movSlotData.venue_name}}
							</text>
							<!-- <text
								style="position: absolute;bottom: 80rpx;left: 20rpx;">{{movSlotData.venue_name}}</text> -->
							<!-- 二维码 -->
							<image style="width: 52rpx; height: 52rpx;position: absolute;right: 20rpx;top: 20rpx;"
								src="https://jiangsudiantuo2022.oss-cn-hangzhou.aliyuncs.com/img/35e690d147059c753e57e8b7c2341ffdfb2b973e.png">
								<!-- 311f292561fcda2a824ae80f2d015f28cef7e3cb -->
							</image>
							<!-- 横线 -->
							<!-- <image style="width: 100%; height: 3rpx; position: absolute;bottom: 60rpx;left: 0;"
								src="https://jiangsudiantuo2022.oss-cn-hangzhou.aliyuncs.com/img/dc99aabb13c7ed1b8ef7880b40390ccf42595dde.png">
							</image> -->
							<!--票 中间图标 -->
							<image style="width: 86rpx; height: 29rpx;position: absolute;left: 44%;top: 40%;"
								v-if="movSlotData.order_type == 1"
								src="https://jiangsudiantuo2022.oss-cn-hangzhou.aliyuncs.com/img/e4d512084bd2646fceb56e11560964819911026d.png">
								<!-- 1ddf19e21ff72de47e364e4e72d34c09983cfadf -->
							</image>
							<!-- 赛事 -->
							<image style="width: 86rpx; height: 29rpx;position: absolute;left: 44%;top: 40%;"
								v-if="movSlotData.order_type == 8"
								src="https://jiangsudiantuo2022.oss-cn-hangzhou.aliyuncs.com/img/fd4f187b06eace3d5beb70a506622e9f67294b20.png">
								<!-- 776a995e98cb4841f6a7edfd3943e5766379e20f -->
							</image>
							<!-- 场地 -->
							<image style="width: 86rpx; height: 27rpx;position: absolute;left: 44%;top: 40%;"
								v-if="movSlotData.order_type == 3"
								src="https://jiangsudiantuo2022.oss-cn-hangzhou.aliyuncs.com/img/c62d5532bddf0445e5a35eaeea1a39c9dce35757.png">
								<!-- 57dab7876655f9f966439e33d2923793c7bdcd79 -->
							</image>
							<!--票  -->
							<!-- <text style="position: absolute;bottom: 20rpx;right: 20rpx;"
								v-if="movSlotData.is_yxq == null && movSlotData.order_type == 1">长期有效</text>
							<text style="position: absolute;bottom: 20rpx;right: 20rpx;"
								v-if="movSlotData.is_yxq != null && movSlotData.order_type == 1">{{movSlotData.goods.start}}
								- {{movSlotData.goods.end}}</text> -->
							<!-- 场地 -->
							<!-- <text style="position: absolute;bottom: 20rpx;right: 20rpx;"
								v-if="movSlotData.order_type == 3">{{movSlotData.goods.start}}-{{movSlotData.goods.end}}</text> -->
							<!-- 赛事 -->
							<!-- <text style="position: absolute;bottom: 20rpx;right: 20rpx;"
								v-if="movSlotData.order_type == 8">{{movSlotData.goods.start}}-{{movSlotData.goods.end}}</text> -->
						</view>
					</template>
				</movable-swiper>
			</view>
			<!-- <view class="">
				11111{{scene}}
			</view> -->
			<!-- <scroll-view class='scrollContainer' scroll-x v-if="itemxx.flag == 11 && homeData.show_buy == 1 && lastDataList !=''">
			    <view class='scrollitem' v-for="(item, index) in detail.list" :key="index"   >
			     <view class="section_8 flex-col" @click="goTeamDetails(item.id)">
			       <view class="flex-row">
			         <image
			           :src="item.venue_thumb"
			           class="image_1"
			         />
			         <view class="group_12 flex-col">
			           <view class="flex-row">
			             <text class="text_22">{{item.venue_name}}</text>
			             <view class="text-wrapper flex-col items-center view_9">
			        <text  :class="item.sex==1 ? 'bblue' : 'ppink'">{{item.sex_c}}</text>
			       </view>
			           </view>
			        评星
			           <u-rate inactive-icon="star" :current="item.star_level" :disabled="true"></u-rate>
			         </view>
			       </view>
			       <text class="text_25">{{index}}</text>
			     </view>
			   
			    </view>
			    <view class="EmptyData" v-if="teamArr.length==0">暂无数据</view>
			   </scroll-view> -->

		</view>
		<!-- 底部导航组件 -->
		<tarbar :valueModel="tabbar_index" :footerArr="homeData.footer"></tarbar>
	</view>
</template>

<script>
	import QSNavbar from "@/components/QS-Navbar/QS-Navbar.vue";
	import tarbar from "@/components/tarbar/index.vue";
	import goodsSwiper from "@/components/pyh-goodsSwiper/pyh-goodsSwiper.vue";
	import movableSwiper from '@/components/movable-swiper/movable-swiper.vue';
	const index = require("@/api/index/index.js");
	const personal = require('@/api/personal/index.js')
	export default {
		components: {
			QSNavbar,
			tarbar,
			goodsSwiper,
			movableSwiper,
		},
		data() {
			return {
				jisolianlist: [{
						img: 'https://jiangsudiantuo2022.oss-cn-hangzhou.aliyuncs.com/img/eb7ee1375ede9758ee96df1f6419b07352c79701.jpeg',
						title: '羽毛球教练',
						name: '冯佳颖',
						value: '5',
						sex: 0

					},
					{
						img: 'https://jiangsudiantuo2022.oss-cn-hangzhou.aliyuncs.com/img/79b2093730b0ce4352f46631c25fd5b44140894b.jpeg',
						title: '羽毛球教练',
						name: '吴青',
						value: "5",
						sex: 0
					},
					{
						img: 'https://jiangsudiantuo2022.oss-cn-hangzhou.aliyuncs.com/img/f882943b9165a21edd44a3294b18e4069cf88e98.jpeg',
					},
				],
				scene: "",
				movHeight: '205rpx', //卡片高度
				//传入的数据示例
				lastDataList: [],
				teamArr: [{
						cover: 'https://jiangsudiantuo2022.oss-cn-hangzhou.aliyuncs.com/6a/54ad09877f399769dbae3245b189e3.jpg?attname=ac094c83a45a9a5d.jpg',
						name: '12312132',
						signal: '132132132'
					},
					{
						cover: 'https://jiangsudiantuo2022.oss-cn-hangzhou.aliyuncs.com/6a/54ad09877f399769dbae3245b189e3.jpg?attname=ac094c83a45a9a5d.jpg',
						name: '12312132',
						signal: '132132132'
					},
					{
						cover: 'https://jiangsudiantuo2022.oss-cn-hangzhou.aliyuncs.com/6a/54ad09877f399769dbae3245b189e3.jpg?attname=ac094c83a45a9a5d.jpg',
						name: '12312132',
						signal: '132132132'
					},
					{
						cover: 'https://jiangsudiantuo2022.oss-cn-hangzhou.aliyuncs.com/6a/54ad09877f399769dbae3245b189e3.jpg?attname=ac094c83a45a9a5d.jpg',
						name: '12312132',
						signal: '132132132'
					}
				],
				text1: [],
				address: {
					name: "",
					city: "",
					province: "",
				},
				newsDemoImage: this.$https.assetsPath + "09d9c9e3c595db3dfd06919727d6db8ed9c771c5.png",
				building: this.$https.assetsPath + "48c89be73bd5b5100d62d9e224efd88047b262fa.png",
				config: {
					autoplay: true,
					interval: 1000,
					multiple: 2.58,
				},
				detail: {
					title: "",
					list: [],
					tabList: [], //图标菜单
					hiddenTab: false, //隐藏tab
				},
				more: this.$https.assetsPath + "66bd2432e846ed909c5773c2448c4e356fea5568.png",
				projectList: [{
						name: "游泳",
						icon: this.$https.assetsPath +
							"6bdbf4f1d1e68a2f393b2e9392d4ebf3c38d1356.png",
					},
					{
						name: "足球",
						icon: this.$https.assetsPath +
							"60e0724ec99734982c13bb16bfa4b3cdec267177.png",
					},
					{
						name: "乒乓球",
						icon: this.$https.assetsPath +
							"a219d5467fe53030818ce87f3f3138f0b24b1ae4.png",
					},
					{
						name: "羽毛球",
						icon: this.$https.assetsPath +
							"8a6069c5c2332cc9e6674c0cc150e606bad4b1a5.png",
					},
					{
						name: "更多",
						icon: this.$https.assetsPath +
							"f104f1ff15de0325b21902401e36276a1f6ba65c.png",
					},
				],
				activityRightImage: [
					this.$https.assetsPath + "a6895fbcbffac19df0154b6239a280c4b996015c.png",
					this.$https.assetsPath + "038eb14a1d3281c88fc979d00ec3987597941ed6.png",
				],
				activityLeftImage: this.$https.assetsPath + "d910a9a70e119605704470efc39b8a850740f8da.png",
				baseList: [{
						name: this.$https.assetsPath +
							"1c8bd93c1335b586cf7b7b11d4e252ad82372b98.png",
						title: "领券中心",
					},
					// {
					// 	name: this.$https.assetsPath +
					// 		"b4b417edb1fc3feac5c98c39fca21d2eb2570f49.png",
					// 	title: "活动发布",
					// },
					// {
					// 	name: this.$https.assetsPath +
					// 		"33ff8b31c211638b5d1af5ad387dbba32d7548c3.png",
					// 	title: "约赛PK",
					// },
					{
						name: this.$https.assetsPath +
							"91da7db75637ca495c60867b58d71d92a2866c5b.png",
						title: "砍价助力",
					},
					{
						name: this.$https.assetsPath +
							"27f15d96a29c1c21e7313e71cd0965051f01b844.png",
						title: "拼团抢购",
					},
					{
						name: this.$https.assetsPath +
							"b00b87a619e9ca509b4569e6548a496f93414f07.png",
						title: "幸运抽奖",
					},
				],
				marketLeftImage: this.$https.assetsPath + "baf8211ce23662ee4ee217cea465628a00e79d40.png",
				business_arr: [{
						image: this.$https.assetsPath +
							"dd1d0b2e888cea2aaa6913f44a894f90337af2f8.png",
						text: "场馆介绍",
					},
					{
						image: this.$https.assetsPath +
							"d24a1dd98318027896cc4a82419fdd90e48887ea.png",
						text: "收费标准",
					},
					{
						image: this.$https.assetsPath +
							"c40e6259af151673b9cd0086431eb193670d2f4a.png",
						text: "地图导航",
					},
				],
				src: "https://cdn.uviewui.com/uview/album/1.jpg",
				navbarItems_1: [{
					layout: "left",
					type: "text",
					text: "",
					width: 100,
					weight: "bold",
					color: "#000000",
				}, ],
				homeData: [],
				tabbar_index: 0, // 底部导航默认选中
				newsList: [],
				options: {},
				page_url: '/pages/index/index',
				Homelist: []
			};
		},
		computed: {
			filterTab() {
				if (this.detail.hiddenTab) {
					let data = this.detail.tabList.slice(0, 4);
					data.push({
						icon: this.$https.assetsPath +
							"6bdbf4f1d1e68a2f393b2e9392d4ebf3c38d1356.png",
						name: "更多",
						id: -1,
					});
					console.log(data)
					return data;
				} else {
					return this.detail.tabList;
				}
			},
		},
		onLoad(options) {
			console.log(options, '222')
			this.options = options
			// 二维码用户openid
			const scene = decodeURIComponent(options.scene)
			this.scene = scene
			uni.setStorageSync('codescene', scene)
			console.log(scene, '9999999')
			uni.setStorageSync('openidlist', options.openidlist)
			// 获取页面设置配置
			const _this = this;
			// 获取学员资料
			let params = {
				app_id: this.$https.weixinAppId,
			}
			personal.getProjectIdByAppId(params).then(result => {
				getApp().globalData.projectId = result.data.result
				getApp().globalData.sign = result.data.sign;
				let that = this;
				// if (uni.getStorageSync("tarbar_inx1")) {
				// 	that.tabbar_index = uni.getStorageSync("tarbar_inx1");
				// }
				// 查询对应小程序的配置信息
				that.getAppletConfig();
				that.getNewsList();
				// that.getLocation();
				that.get_component()
				that.getOrderFive()
			})
		},

		methods: {
			businessclick(item, index) {
				console.log(index)
			},
			// 首页购买产品展示
			async getOrderFive() {
				let that = this;
				let data = {
					app_id: this.$https.weixinAppId,
					project_id: getApp().globalData.projectId,
					open_id: uni.getStorageSync('openid'),
				};
				let result = await index.getOrderFive(data);
				if (result.code == 1) {
					this.lastDataList = result.data.result
				}
			},
			// 首页组件排序
			async get_component() {
				let that = this;
				let data = {
					app_id: this.$https.weixinAppId,
					project_id: getApp().globalData.projectId,
					open_id: uni.getStorageSync('openid'),
				};
				let result = await index.get_component(data);
				if (result.code == 1) {
					this.Homelist = result.data.result
				}
			},
			goTeamDetails(item) {},
			openKind(item, index, type) {
				let _this = this
				uni.setStorageSync('id', item.id);
				uni.navigateTo({
					url: "/pages/venues/index",
				})
			},
			openTeacher() {
				// uni.navigateTo({
				// 	url: "/pages/index/coach/coachDetail",
				// });
			},
			async getLocation() {
				const [err, res] = await uni.getLocation({
					isHighAccuracy: true, // 开启地图精准定位
					type: "gcj02",
				});
			},

			async getAppletConfig() {
				let that = this;
				let data = {
					weixinAppId: this.$https.weixinAppId,
					projectId: getApp().globalData.projectId,
				};
				let result = await index.index(data);
				if (result.code == 1) {
					that.homeData = result.data; // 首页完整数据
					that.text1 = that.homeData.notice
					that.navbarItems_1[0].text = result.data.name; // 页头标题
					that.getVenusList(result.data.venues);
					uni.setStorageSync("applet_icon", result.data.applet_icon);
					uni.setStorageSync("applet_name", result.data.name);
					this.homeData.footer.forEach((item, index) => {
						if (this.page_url == item.page_url) {
							this.tabbar_index = index
						}
					})
					this.$nextTick(function() {
						this.homeData.footer[this.tabbar_index].this_icon =
							this.homeData.footer[this.tabbar_index].selected_icon;
					}); // 默认选中底部Tabbar
				}
			},
			async getVenusList(venues_id) {
				let that = this;
				let data = {
					venues_id: venues_id,
					weixinAppId: this.$https.weixinAppId,
					projectId: getApp().globalData.projectId,
					limit: 9,
					child: 8
				};
				let result = await index.getVenusList(data);
				if (result.code == 1) {
					//设置tab
					if (this.detail.tabList.length < 1) {
						this.detail.tabList = result.data.project;
						if (this.detail.tabList.length > 5) {
							this.detail.hiddenTab = true;
						}
					}
					that.detail.list = result.data.data;
				}
			},
			async getNewsList() {
				let that = this;
				let data = {
					weixinAppId: this.$https.weixinAppId,
					projectId: getApp().globalData.projectId,
					limit: 5,
				};
				let result = await index.getNewsList(data);
				if (result.code == 1) {
					that.newsList = result.data.data;
				}
			},
			async getIndustryInfoMore() {
				let that = this
				let data = {
					app_id: this.$https.weixinAppId,
					project_id: getApp().globalData.projectId,
					mark: this.mark,
					mark_id: this.mark_id,
					page: 1,
					limit: 3
				}
				let result = await index.getIndustryInfoMore(data)
				if (result.code == 1) {
					that.newsList = result.data.result
				}
			},
			goNewsDetail(id) {
				uni.navigateTo({
					url: "/pages/newsDetailPages/newsDetailPages?id=" + id,
				});
			},
			goNewsList() {
				uni.navigateTo({
					url: "/pages/newsListPages/newsListPages",
				});
			},
			openNotice() {
				uni.navigateTo({
					url: "/pages/index/notice/notice",
				});
			},
			//场馆详情
			StoreDetaillist(im) {
				uni.navigateTo({
					url: "/page_points/storeDetail/storeDetail?id=" + im.id,
				});
			},

			cate_list(item, e) {
				console.log(item, e, '789')
				let e_num = e
				// index_style  0原本样式    1新样式
				if (this.homeData.index_style == 0) {
					uni.navigateTo({
						url: "/pages/index/menuKind/menuKind?name=" + item.name + '&e_num=' + e_num + '&windows=' +
							item.windows,
					})
				} else if (this.homeData.index_style == 1) {
					uni.navigateTo({
						url: "/page_points/venue_district/venue_district?windows=" + item.windows,
					})
				}
			},
			cate_list_item(item, index) {
				uni.navigateTo({
					url: item.path,
				})
			},
			base_List(baseListItem, baseListIndex) {
				console.log(baseListItem, baseListIndex, '2222')
				if (baseListIndex == 0) {
					uni.navigateTo({
						url: '/pages_a/coupon/coupon_activity'
					})
				} else if (baseListIndex == 1) {
					uni.navigateTo({
						url: '/page_bargain/mybargain'
					})
				} else if (baseListIndex == 2) {
					uni.navigateTo({
						url: '/page_collage/mycollage'
					})
				} else if (baseListIndex == 3) {
					uni.navigateTo({
						url: '/page_luckdraw/lucky/lucky'
					})
				}
			},
			Points() {
				uni.navigateTo({
					url: '/page_points/page_points/points_mall'
				})
			}
		},
	};
</script>

<style lang="scss" scoped>
	@import url("@/static/css/index/index.css");

	.adress {
		margin-right: 20rpx;
		font-size: 28rpx;
		white-space: nowrap;
		color: white;
	}

	.notice /deep/ .u-icon__img {
		width: 60rpx !important;
		height: 30rpx !important;
	}

	// 容器
	.scrollContainer {
		width: 95%;
		height: 194rpx;
		white-space: nowrap;
		margin-top: 18rpx;
	}

	// 容器项
	.scrollitem {
		display: inline-block;
		margin-left: 30rpx;
		height: 234rpx;
	}

	.scrollimage {
		width: 270rpx;
		height: 154rpx;
	}

	.recommandItemText {
		width: 270rpx;
		text-align: center;
		text-overflow: ellipsis;
		overflow: hidden;
		white-space: nowrap;
	}

	.EmptyData {
		text-align: center;
		margin-top: 50rpx;
	}

	.team {
		position: relative;
	}

	.section_8 {
		padding: 30rpx 20rpx 25rpx;
		background-color: rgb(255, 255, 255);
		box-shadow: 0px 0px 8.9rpx 1.1rpx rgba(0, 0, 0, 0.06);
		border-radius: 10rpx;
		height: 187rpx;
		width: 327rpx;
		position: relative;
	}

	.image_1 {
		width: 80rpx;
		height: 80rpx;
	}

	.image_3 {
		width: 20rpx;
		height: 20rpx;
	}

	.image_5 {
		width: 21rpx;
		height: 20rpx;
	}

	.text_25 {
		margin-left: 2rpx;
		margin-top: 17rpx;
		align-self: flex-start;
		color: rgb(190, 190, 190);
		font-size: 22rpx;
		font-family: PingFang SC;
		line-height: 22rpx;
	}

	.group_12 {
		margin-right: 69rpx;
		align-self: center;
		float: right;
	}

	.group_14 {
		margin-top: 1rpx;
	}

	.text_22 {
		margin-bottom: 2rpx;
		color: rgb(51, 51, 51);
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 700;
		line-height: 23rpx;
	}

	.text-wrapper {
		margin-left: 10rpx;
	}

	.image_6 {
		margin-left: 8rpx;
	}

	.image_8 {
		margin-left: 7rpx;
	}

	.image_10 {
		margin-left: 8rpx;
	}

	.image_12 {
		margin-left: 7rpx;
	}

	.bblue {
		background-color: deepskyblue;
	}

	.ppink {
		background-color: rgb(239, 100, 132);
	}

	.view_9 {
		padding: 11rpx 0 1rpx;
		color: rgb(255, 255, 255);
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 700;
		line-height: 10rpx;

		border-radius: 5rpx;
		width: 29rpx;
		height: 37rpx;
		float: right;
	}

	/* 去除滚动条 */
	::-webkit-scrollbar {
		width: 0;
		height: 0;
		color: transparent;
		display: none;
	}

	.section_9 {
		margin-left: 20rpx;
		padding: 57rpx 0;
		color: rgb(51, 51, 51);
		font-size: 22rpx;
		font-family: PingFang SC;
		font-weight: 500;
		line-height: 21rpx;
		background-color: rgb(255, 255, 255);
		/* box-shadow: 0px 0px 8.9rpx 1.1rpx rgba(0, 0, 0, 0.06); */
		border-radius: 10rpx;
		width: 60rpx;
		height: 100%;
		position: absolute; //父元素的position位置固定，这个绝
	}
</style>